# 满足条件后重复执行的代码块
num=9
while num>1:
    print(num)
    num-=1
    pass

# for循环可以遍历列表或字符串
msg="人生苦短，我用python"
for i in msg:
    print(i,end=" ")
    pass
print()
#如何打印九九乘法表
i=9
while i>=1:
    j=1
    while j<=i:
        print("{}*{}={}".format(j,i,j*i),end=" ")
        j+=1
    i-=1
    print()
print("++++++++++++++++++++++++++++++++++++++++++++++")
#break演示
for a in msg:
    if a=="我":
        break
    print(a,end=" ")
print()
#continue演示
for a in msg:
    if a=="我":
        continue
    print(a,end=" ")